package io.renren.modules.sys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.modules.sys.entity.Organization;
import io.renren.modules.sys.entity.SysRoleMenuEntity;
import io.renren.modules.sys.vo.TreeNode;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

import java.util.List;

/**
 * Description
 *
 * @Author: cjl
 * @Date: 2019/3/6 15:10
 */
public interface SysOrganizationService  extends IService<Organization> {
    Organization getOrganization(long id) throws Exception ;
    List<Organization> getOrganizationListByIds(String ids)throws Exception ;
    int insertOrganization(String beanJson, HttpServletRequest request)throws Exception ;
    int updateOrganization(String beanJson, Long id, HttpServletRequest request)throws Exception ;
    int deleteOrganization(Long id, HttpServletRequest request)throws Exception ;
    int batchDeleteOrganization(String ids, HttpServletRequest request)throws Exception ;
    int addOrganization(Organization org,Long userId) throws Exception;
    int editOrganization(Organization org,Long userId)throws Exception ;
    List<TreeNode> getOrganizationTree(Long id)throws Exception ;
    List<Organization> findById(Long id) throws Exception;
    List<Organization> findByOrgNo(String orgNo)throws Exception ;
    void checkOrgNoIsExists(String orgNo,Long id)throws Exception ;
    int batchDeleteOrganizationByIds(String ids,Long userId) throws Exception;
    List<Long> getOrgIdByParentId(Long orgId) ;
    void getOrgIdByParentNo(List<Long> idList,String orgNo) ;
}
